package edu.nazarevych.portal.entities;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import javax.persistence.Table;

import org.apache.commons.lang3.builder.ReflectionToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;

@Entity
@Table(name="tbl_Aparature")
public class Aparature extends BaseEntity{
	
	@Column(name = "Name")
    private String Name;
	
	@OneToOne
	@JoinColumn(name = "Type",referencedColumnName="id")
	private AparatureType aparatureType;
	
	@OneToOne
	@JoinColumn(name = "Station",referencedColumnName="id")
	private Stations station;
	
	public String getName() {
		return Name;
	}

	public void setName(String name) {
		Name = name;
	}

	public AparatureType getAparatureType() {
		return aparatureType;
	}

	public void setAparatureType(AparatureType aparatureType) {
		this.aparatureType = aparatureType;
	}

	public Stations getStation() {
		return station;
	}

	public void setStation(Stations station) {
		this.station = station;
	}

	public String toString() {
        return ReflectionToStringBuilder.toString(this, ToStringStyle.SHORT_PREFIX_STYLE);
    }
	
}
